package com.ms.p2p.provider.impl;


import com.alibaba.dubbo.config.annotation.Service;
import com.ms.common.exception.NoticeException;
import com.ms.p2p.bean.PageBean;
import com.ms.p2p.entity.account.Account;
import com.ms.p2p.entity.account.AccountRecharge;
import com.ms.p2p.entity.account.Withdraw;
import com.ms.p2p.entity.loan.Loan;
import com.ms.p2p.entity.system.AdminUser;
import com.ms.p2p.provider.MemberAccountProvider;
import com.ms.p2p.service.impl.MemberAccountServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Service
public class MemberAccountProviderImpl  implements MemberAccountProvider {

    @Autowired
    MemberAccountServiceImpl memberAccountService;

    public int openAccount(Account account) {
        return memberAccountService.openAccount(account);
    }

    public Account findByUserId(int userId) {
        return memberAccountService.findByUserId(userId);
    }

    public BigDecimal sumYuebao() {
        return memberAccountService.sumYuebao();
    }


    public List<Map<String, Object>> findPager(String userId, String userName, String begin_date, String end_date, PageBean page) {
        return memberAccountService.findPager(userId,userName,begin_date,end_date,page);
    }

    public int findCount(String userId, String userName, String begin_date, String end_date) {
        return memberAccountService.findCount(userId,userName,begin_date,end_date);
    }

    public List<Map<String, Object>> findAll(String userId, String userName, String begin_date, String end_date) {
        return memberAccountService.findAll(userId,userName,begin_date,end_date);
    }

    public List<Map<String, Object>> geteveryday(PageBean page) {
        return memberAccountService.geteveryday(page);
    }

    public List<Account> findlistByCollection(String collection) {
        return memberAccountService.findlistByCollection(collection);
    }

    public void CacueEvc(String evc_id, BigDecimal successAmount, Integer u_id, Loan borrow) {

    }

    public List<Map<String, Object>> FindTG() {
        return memberAccountService.FindTG();
    }

    public void OperAccount(String ip, BigDecimal money, int userId, String remark, String type, String s) {
         memberAccountService.OperAccount(ip,money,userId,remark,type,s);
    }

    public List<Map<String, Object>> findtenderListIndex() {
        return memberAccountService.findtenderListIndex();
    }

    public List<Map<String, Object>> findtenderListPager(String time_limit, String begin_date, String end_date, PageBean page) {
        return memberAccountService.findtenderListPager(time_limit,begin_date,end_date,page);
    }

    public List<Map<String, Object>> findCollectioListPager(String userId, String userName, String realname, String begin_date, String end_date, String is_day, PageBean page) {
        return memberAccountService.findCollectioListPager(userId,userName,realname,begin_date,end_date,is_day,page);
    }

    public void cashVerify(String ip, Withdraw withdraw, String remark) {
            memberAccountService.cashVerify(ip,withdraw,remark);
    }



    public void rechargeVerify(AccountRecharge recharge, String header, String remoteIp, AdminUser emp,String remark,String status) throws NoticeException{
        memberAccountService.rechargeVerify(recharge,header,remoteIp,emp,remark,status);
    }
}
